package com.appoint.common.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @ClassName:  WX_INF_CONFIG_CODE
 * @Description: 微信小程序 配置信息
 * @author baode
 * @date 2021年2月14日 下午3:01:32
 */
public enum WX_INF_CONFIG_CODE {

	/** wx_token */
	wx_token("wx.token", "微信小程序配置信息"),
    /** wx_code_session */
    wx_code_session("wx.code.session", "微信小程序配置信息"),
    /** about_us */
    about_us("about.us", "关于我们图片");

	private String code;
	private String desc;

	private WX_INF_CONFIG_CODE(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	private static final Map<String, String> MAP = new HashMap<String, String>();
	static {
		for (WX_INF_CONFIG_CODE agentType : EnumSet.allOf(WX_INF_CONFIG_CODE.class)) {
			MAP.put(agentType.getCode(), agentType.getDesc());
		}
	}

	public static String getDesc(String code) {
		return MAP.get(code);
	}
}
